#!/bin/sh

# Copyright 2011-2012 UnboundID Corp.
# All Rights Reserved.
#


# Get the current working directory and the tools directory.
CURRENT_DIR=`pwd`
cd "`dirname "${0}"`"
TOOLS_DIR=`pwd`
cd ${CURRENT_DIR}


# Figure out which Java command to invoke.
if test -z "${UNBOUNDID_JAVA_HOME}"
then
  if test -z "${JAVA_HOME}"
  then
    JAVA_CMD="java"
  else
    JAVA_CMD="${JAVA_HOME}/bin/java"
  fi
else
  JAVA_CMD="${UNBOUNDID_JAVA_HOME}/bin/java"
fi

for JAR in "${TOOLS_DIR}"/../lib/*.jar
do
  CLASSPATH=${JAR}:${CLASSPATH}
done

"${JAVA_CMD}" ${JAVA_ARGS} \
     -cp "${CLASSPATH}" \
     com.unboundid.scim.ri.SCIMQueryRate "${@}"

